<div id="ts_list">
    <h2>Transsys program list</h2>
    {% if request.session.ts_programs %}
    <ul>
        {% for tsp in request.session.ts_programs %}
        <li>
            <div class="collapsed">
                <a title="Transsys program {{tsp.tp.name}}" href="{% url tsworkbench.views.ts.viewTP tsp.tp.name %}">{{tsp.tp.name}}</a>
                <a class="expand" href="#" title="expand" ></a>
                <a class="collap" href="#" title="collap" ></a>
                <a id="{% url tsworkbench.views.ts.delTP tsp.tp.name %}" rev="transsys program" class="delete" href="#" title="delete" ></a>
            </div>
            <div class="expanded">
                <ul>
                    {% for dt in request.session.ts_programs.data_set.keys %}
                        <li>
                            <a title="Data set {{dt}}" href="">{{tsp.tp.name}}</a>
                            <a id="" rev="transsys program" class="delete" href="#" title="delete" ></a>
                        </li>
                    {% endfor %}
                </ul>
            </div>
        </li>
        {% endfor %}
    </ul>
    <a id="add_new" href="{%url tsworkbench.views.ts.addTranssysProgram %}" title="Add new Transsys program">Add new</a>
    <a id="upload_new" href="{% url tsworkbench.views.ts.uploadTranssysProgram %}" title="Upload transsys code">Upload new</a>
    <a id="export" class="link-button" href="{% url transsysweb.views.exportWorkspace %}" title="Export workspace">Export</a>
    <a id="import" class="link-button" href="{% url transsysweb.views.importWorkspace %}" title="Import workspace">Import</a>
    {%else%}
    <p>No transsys program</p>
    <a id="add_new" href="{%url tsworkbench.views.ts.addTranssysProgram %}" title="Add new Transsys program">Add new</a>
    <a id="upload_new" href="{% url tsworkbench.views.ts.uploadTranssysProgram %}" title="Upload transsys code">Upload new</a>
    <a id="export" class="link-button" href="{% url transsysweb.views.exportWorkspace %}" title="Export workspace">Export</a>
    <a id="import" class="link-button" href="{% url transsysweb.views.importWorkspace %}" title="Import workspace">Import</a>
    {%endif%}
</div>